package com.aurora.app.service;

import javax.annotation.Resource;
import javax.persistence.LockModeType;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aurora.app.dao.WeixinAppTokenDao;
import com.aurora.app.entity.WeixinAppToken;
import com.aurora.base.dao.BaseDao;
import com.aurora.base.service.BaseService;

@Service
public class WeixinAppTokenService extends BaseService<WeixinAppToken> {
	
	@Resource
	private WeixinAppTokenDao baseDao;
	
	@Override
	public BaseDao<WeixinAppToken> getBaseDao() {
		// TODO Auto-generated method stub
		return this.baseDao;
	}
	
	@Transactional
	public WeixinAppToken findById(String id){
		return this.baseDao.find(id, LockModeType.PESSIMISTIC_WRITE);
	}

}
